home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / playsk / dressup.dxr / 00082_Body Part Handlers.ls < prev    next >
Encoding:
Text File  |  1996-06-30  |  2.5 KB  |  87 lines

  1. on whichButton
  2.   global gOriginalList, gButtonList
  3.   repeat with channel = 20 to 24
  4.     if the clickOn = channel then
  5.       set the castNum of sprite channel to the number of member getAt(gOriginalList, channel - 19)
  6.       puppetSprite(channel, 0)
  7.       play frame getAt(gButtonList, channel - 19)
  8.     end if
  9.   end repeat
  10. end
  11.  
  12. on whichbodypart
  13.   global gMov, gCurrentSprite
  14.   repeat with i = 7 to 18
  15.     if the clickOn = i then
  16.       smallbodypart(getAt(gBigBodyPartList, i - 6), i + 23)
  17.       exit repeat
  18.       next repeat
  19.     end if
  20.     if the clickOn = (i + 23) then
  21.       getbigbodypart(getAt(gBigBodyPartList, i - 6), i + 23)
  22.       exit repeat
  23.       next repeat
  24.     end if
  25.     if the clickOn = 45 then
  26.       putbigbodypart(getAt(gBigBodyPartList, i - 6), gCurrentSprite)
  27.       exit repeat
  28.     end if
  29.   end repeat
  30. end
  31.  
  32. on smallbodypart thisCast, thisSprite
  33.   global gMov, gCurrentSprite
  34.   if gMov = 0 then
  35.     set gMov to 1
  36.     set gCurrentSprite to thisSprite
  37.     puppetSprite(45, 1)
  38.     set the locH of sprite 45 to the mouseH
  39.     set the locV of sprite 45 to the mouseV
  40.     set the castNum of sprite 45 to the number of member thisCast
  41.     updateStage()
  42.     set the cursor of sprite 45 to 200
  43.     set the cursor of sprite 1 to 200
  44.     set the visible of sprite 45 to 1
  45.   end if
  46. end
  47.  
  48. on getbigbodypart thisCast, thisSprite
  49.   global gMov, gCurrentSprite
  50.   set gMov to 1
  51.   set gCurrentSprite to thisSprite
  52.   set the cursor of sprite 45 to 200
  53.   set the cursor of sprite 1 to 200
  54.   puppetSprite(45, 1)
  55.   set the visible of sprite 45 to 1
  56.   set the visible of sprite thisSprite to 0
  57.   set the locH of sprite 45 to the mouseH
  58.   set the locV of sprite 45 to the mouseV
  59.   set the castNum of sprite 45 to the number of member thisCast
  60.   updateStage()
  61. end
  62.  
  63. on putbigbodypart thisCast, thisSprite
  64.   global gMov, gCurrentSprite, gBigBodyTypeList
  65.   repeat with i = 1 to 12
  66.     if the visible of sprite (i + 29) = 1 then
  67.       set placedSpriteType to getAt(gBigBodyTypeList, i)
  68.       set thisSpriteType to getAt(gBigBodyTypeList, gCurrentSprite - 29)
  69.       if placedSpriteType = thisSpriteType then
  70.         set the visible of sprite (i + 29) to 0
  71.         exit repeat
  72.       end if
  73.     end if
  74.   end repeat
  75.   set the visible of sprite 45 to 0
  76.   set gMov to 0
  77.   if sprite 45 intersects 26 then
  78.     set the visible of sprite thisSprite to 1
  79.     set thisFrame to getAt(gBigBodyPartList, thisSprite - 29)
  80.     play frame thisFrame
  81.   else
  82.     set the visible of sprite thisSprite to 0
  83.   end if
  84.   set the cursor of sprite 45 to 0
  85.   set the cursor of sprite 1 to 0
  86. end
  87.